package com.tjmc.recruit.finance.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.tjmc.recruit.finance.api.enums.UsageServiceTypeEnum;
import com.tjmc.recruit.finance.api.enums.UsageTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 消费记录表
 *
 * @author recruit
 * @date 2024-11-25 14:17:34
 */
@Data
@TableName("usage_records")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "消费记录表")
public class UsageRecordsEntity extends Model<UsageRecordsEntity> {


    /**
     * 消费记录 ID，主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "消费记录 ID，主键")
    private Long usageId;
    /**
     * 消费类型：E币、短信、子账号、职位发布、职位刷新
     */
    @Schema(description = "消费类型：E币、短信、子账号、职位发布、职位刷新")
    private UsageTypeEnum usageType;

    /**
     * 用户ID
     */
    @Schema(description = "消费用户ID")
    private Long usageAccountId;

    /**
     * 企业ID
     */
    @Schema(description = "消费企业ID")
    private Long usageCompanyId;

    /**
     * 消费类型（职位刷新、置顶等）
     */
    @Schema(description = "消费类型（职位刷新、置顶等）")
    private UsageServiceTypeEnum serviceType;

    /**
     * 关联的服务 ID（如职位 ID）
     */
    @Schema(description = "关联的服务 ID（如职位 ID）")
    private Long serviceId;

    /**
     * 服务名称：职位名称、用户名称
     */
    @Schema(description = "服务名称：职位名称、用户名称")
    private String serviceName;

    /**
     * 消费项
     */
    @Schema(description = "消费项：置顶天时等")
    private String usageItem;
    /**
     * 消费内容描述
     */
    @Schema(description = "消费内容描述")
    private String usageDesc;

    /**
     * 消费金额
     */
    @Schema(description = "消费金额")
    private BigDecimal amount;

    /**
     * 消费时间
     */
    @Schema(description = "消费时间")
    private LocalDateTime createdAt;
}
